#!/bin/bash

sudo ls > /dev/null 
## 配置pip源
echo "安装pip源..."


mkdir -p ~/.pip
echo "[global] " > ~/.pip/pip.conf
echo "index-url = https://pypi.tuna.tsinghua.edu.cn/simple " >> ~/.pip/pip.conf
echo "[install] " >> ~/.pip/pip.conf
echo "trusted-host = https://pypi.tuna.tsinghua.edu.cn  # trusted-host " >> ~/.pip/pip.conf


sudo bash -c 'mkdir -p /root/.pip'
sudo bash -c 'echo "[global] " > /root/.pip/pip.conf'
sudo bash -c 'echo "index-url = https://pypi.tuna.tsinghua.edu.cn/simple " >> ~/.pip/pip.conf'
sudo bash -c 'echo "[install] " >> /root/.pip/pip.conf'
sudo bash -c 'echo "trusted-host = https://pypi.tuna.tsinghua.edu.cn  # trusted-host " >> /root/.pip/pip.conf'


echo "安装完成！！！"
